package com.itfreer.data.syn.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.itfreer.form.api.entity.EntityBase;
import com.itfreer.form.api.reflect.DictionaryField;

/**
 * 数据同步日志服务
 */
@Entity(name = "data_syn_log")
public class DataSynLogEntity extends EntityBase implements Serializable {

	private static final long serialVersionUID = -2739195535161688054L;

	/**
	 * 数据ID
	 */
	@Id
	@Column(name = "id", length = 50, nullable = false)
	private String id;

	/**
	 * 同步ID
	 */
	@Column(name = "s_synide", length = 50, nullable = true)
	private String synid;

	/**
	 * 配置ID
	 */
	@DictionaryField(dictionaryName = "datasynconfig", toFieldName = "configName")
	@Column(name = "s_configid", length = 50, nullable = true)
	private String configid;

	@Transient
	private String configName;

	/**
	 * 成功状态
	 */
	@Column(name = "b_state", nullable = true)
	private Boolean state;

	/**
	 * 详细信息
	 */
	@Column(name = "s_info", length = 500, nullable = true)
	private String info;

	/**
	 * 记录时间
	 */
	@Column(name = "d_adddate", length = 50, nullable = true)
	private Date addDate;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSynid() {
		return synid;
	}

	public void setSynid(String synid) {
		this.synid = synid;
	}

	public String getConfigid() {
		return configid;
	}

	public void setConfigid(String configid) {
		this.configid = configid;
	}

	@Transient
	public String getConfigName() {
		return configName;
	}

	public void setConfigName(String configName) {
		this.configName = configName;
	}

	public Boolean getState() {
		return state;
	}

	public void setState(Boolean state) {
		this.state = state;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public Date getAddDate() {
		return addDate;
	}

	public void setAddDate(Date addDate) {
		this.addDate = addDate;
	}
}
